package com.yanger.controller;


import com.yanger.dao.EmployeeDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class employeeController {

    @Autowired
    private EmployeeDao employeeDao;


    @RequestMapping("/emps")
    public String getAll(Model model){
        model.addAttribute("emps",employeeDao.getAllEmployee());
        return "emp/list";
    }

}
